﻿//医护对讲
var ajaxCallUrl = CallNumberUrl+'/VideoPass/selectByVideoPassSwitch';//医护对讲验证接口
var ajaxCallStatusUrl = CallNumberUrl+'/VideoPass/selectTriageDeviceCallStatus';//分诊台查询并修改勿扰模式
var ajaxFirstDicUrl = SystemLimitUrl+'/dic/list';
var lastClick = null;
var load = null;

/**
 * 刷新
 * */
function refreshTab() {
    if(!clickThrottle()) return;
    var idx = $('#nurse_tabs li.active').index();
    refreshTabs(idx);
    resetBtn();
}
function refreshTabs(idx) {
    load = parent?parent.layer.load(2,{time:10*1000}):layer.load(2,{time:10*1000});
    resetBtn();
    if(idx==0) {
        getWaitList();
    } else if(idx==1){
        getFzList();
    }else if(idx==2){
        getYjzList();
    }else if(idx==3){
        getWbdList();
    }
}
function greenChannelButton() {
    var greenChannel = localStorage.greenChannel;
    if (greenChannel == "1") {
        $("#btn_lstd").show();
    } else {
        $("#btn_lstd").hide();
    }
}
/***
 *  Tab切换
 * **/
function initTabs() {
    $('#nurse_tabs').on('click','li',function () {
        if(!$(this).hasClass('active')){
            $(this).addClass('active').siblings().removeClass();
            var idx = $(this).index();
            $('.tab-table .tab-item:eq('+idx+')').addClass('mui-show').siblings().removeClass('mui-show');
            refreshTabs(idx);
        }
    });
}
/**
 *  注册右键点击事件
 * **/
function mouseRightMenus() {
    layui.config({base: '../source/layui_exts/'}).use(['mouseRightMenu','layer','jquery'],function(){
        var mouseRightMenu = layui.mouseRightMenu;
        //左键监听
        $('#waitTab .tab-body,#fzTab .tab-body,#yjzTab .tab-body').on("click",'ul li',function(){
            var data = $(this).parents('ul').data();
            $(this).parents('ul').addClass('active').siblings().removeClass('active');
            $(this).parents('ul').find('input[type=radio]').prop('checked','checked');
            setActiveButton(data);
        });
        $('#wdbTab .tab-body').on("click",'ul li',function(){
            $(this).parents('ul').addClass('active').siblings().removeClass('active');
        });
        //右键监听
        $('#waitTab .tab-body,#fzTab .tab-body,#yjzTab .tab-body').on("contextmenu",'ul li',function(){
            var data = $(this).parents('ul').data();
            var menu_data = setActiveButton(data);
            $(this).parents('ul').addClass('active').siblings().removeClass('active');
            $(this).parents('ul').find('input[type=radio]').prop('checked','checked');
            /**
             // disabled 0 禁用  1 启用
             var menu_data=[
             {'data':data,'type':'sy','title':'上移',disabled:0},
             {'data':data,'type':'zz','title':'转诊',disabled:0},
             {'data':data,'type':'xy','title':'下移',disabled:0},
             {'data':data,'type':'fz','title':'分诊',disabled:0},
             {'data':data,'type':'yx','title':'优先',disabled:0},
             {'data':data,'type':'fzcz','title':'复诊',disabled:0},
             {'data':data,'type':'lstd','title':'绿色通道',disabled:0},
             {'data':data,'type':'zh','title':'过号召回',disabled:1},
             {'data':data,'type':'gq','title':'挂起',disabled:0},
             {'data':data,'type':'ys','title':'延时',disabled:1}
             ];
             */
            mouseRightMenu.open(menu_data,{
                area:['240px','265px']
            },function(obj){
                var _type = obj.type.trim();
                if(_type=='sycz'){
                    return movePatient('up');
                }else if(_type=='xycz'){
                    return movePatient('down');
                }
                try {
                    if (eval(_type)&&typeof(eval(_type)) == "function") {
                        eval(_type)();
                    }
                }catch (e) {
                    console.log(e.message)
                }
            });
            return false;
        });

    })
}
/**
 *  获取等候患者
 * **/
function getWaitList() {
    var queueId = getLocalQueueId();
    $.ajax({
        url: _hzGetPatients,
        type: "get",
        data: {
            queueId: queueId,
            resource: 'STS'
        },
        success: function (data) {
            parent?parent.layer.close(load):layer.close(load);
            var res = JSON.parse(data);
            if (res.status == 0) {
                var frag =  dealPatientList(res.data,0);
                $('#waitList').html(frag);
                var _queryKey = localStorage.getItem("_P_KEY_");
                $('#pid_'+_queryKey+' li').click();
                localStorage.setItem("_P_KEY_",'');
            }else {
                $('#waitList').html('');
            }
        },
        error: function (data) {
            console.warn(data.message);
        }
    });
}
/***
 *  获取复诊患者
 * */
function getFzList() {
    $.ajax({
        url: _fzGetPatients,
        type: "get",
        data: {
            queueId: getLocalQueueId
        },
        success: function (data) {
            parent?parent.layer.close(load):layer.close(load);
            var res = JSON.parse(data);
            if (res.status == 0) {
                var frag =  dealPatientList(res.data,1);
                $('#fzList').html(frag);
                var _queryKey = localStorage.getItem("_P_KEY_");
                $('#pid_'+_queryKey+' li').click();
                localStorage.setItem("_P_KEY_",'');
            }else {
                $('#fzList').html('');
            }
        },
        error: function (data) {
            console.warn(data.message);
        }
    });
}
/***
 *  获取已就诊患者
 * */
function getYjzList() {
    $.ajax({
        url: _yjzGetPatients,
        type: "get",
        data: {
            queueId: getLocalQueueId
        },
        success: function (data) {
            parent?parent.layer.close(load):layer.close(load);
            var res = JSON.parse(data);
            if (res.status == 0) {
                var frag =  dealPatientList(res.data,2);
                $('#yjzList').html(frag);
                var _queryKey = localStorage.getItem("_P_KEY_");
                $('#pid_'+_queryKey+' li').click();
                localStorage.setItem("_P_KEY_",'');
            }else {
                $('#yjzList').html('');
            }
        },
        error: function (data) {
            console.warn(data.message);
        }
    });
}
/***
 *  获取已就诊患者
 * */
function getWfzList() {
    var systemId = getSystemId();
    localStorage.setItem("_ISNOSPLIT_PAGE_", "Y");
    $.ajax({
        url: _undiagnosedUrl,
        type: "get",
        data: {
            systemId: systemId
        },
        success: function (data) {
            parent?parent.layer.close(load):layer.close(load);
            var res = JSON.parse(data);
            // res = {"status":0,"desc":"操作成功","data":[{"signId":"82f59ed188fd4e6bb7ee9a9b981458b3","patientKey":"1230601","eHealthKey":null,"medicalCardKey":null,"patientName":"测试A1","registerId":"1","registerType":1,"registerObjKey":"21966b686ee84dbfb48f0f2055a1b196_1","registerObjName":"心脏彩超1队列","timeType":0,"registerTime":"2023-01-05 09:07:55","treatDate":"2023-01-05 00:00:00","queuingLevel":null,"queuingLevelName":null,"editor":"automatic","editTime":"2023-01-05 09:09:30","isDeleted":0,"hospitalId":"4e66fabafd944e458dc259ce890c31f3","sex":1,"signDate":"2023-01-05 00:00:00","signType":1,"endTreatDate":"2023-01-05 00:00:00","signTime":"2023-01-05 09:09:30","isTriage":0,"triageTime":null,"signDeviceType":1,"signDeviceId":null,"systemId":"092dcdd7739e4949afe8b4f614a089e6dev","remarks":null,"patientCardKey":"1230601","hospitalizationNo":null,"examinationInfo":null,"docName":"","category":"0","registerNo":"56724814e8c24d9ca6591e23d06626b5","isBook":0,"bookStartTime":null,"bookEndTime":null,"oldRegisterObjKey":null},{"signId":"e6fb58858bcb470d9cfb072690aa2b7f","patientKey":"1230602","eHealthKey":null,"medicalCardKey":null,"patientName":"测试A2","registerId":"2","registerType":1,"registerObjKey":"21966b686ee84dbfb48f0f2055a1b196_1","registerObjName":"心脏彩超1队列","timeType":0,"registerTime":"2023-01-05 09:07:58","treatDate":"2023-01-05 00:00:00","queuingLevel":null,"queuingLevelName":null,"editor":"automatic","editTime":"2023-01-05 09:09:30","isDeleted":0,"hospitalId":"4e66fabafd944e458dc259ce890c31f3","sex":1,"signDate":"2023-01-05 00:00:00","signType":1,"endTreatDate":"2023-01-05 00:00:00","signTime":"2023-01-05 09:09:30","isTriage":0,"triageTime":null,"signDeviceType":1,"signDeviceId":null,"systemId":"092dcdd7739e4949afe8b4f614a089e6dev","remarks":null,"patientCardKey":"1230602","hospitalizationNo":null,"examinationInfo":null,"docName":"","category":"0","registerNo":"a45bd208057d4b1c84bdb85c92b3ad95","isBook":0,"bookStartTime":null,"bookEndTime":null,"oldRegisterObjKey":null}]};
            if (res.status == 0) {
                var frag =  dealPatientList(res.data,3);
                $('#wfzList').html(frag);
                var _queryKey = localStorage.getItem("_P_KEY_");
                $('#pid_'+_queryKey+' li').click();
            }else {
                $('#wfzList').html('');
            }
        },
        error: function (data) {
            console.warn(data.message);
        }
    });
}
/***
 *  获取未报到患者
 * */
function getWbdList() {
    localStorage.setItem("_ISNOSPLIT_PAGE_", "Y");
    $.ajax({
        url: _noSignUrl,
        type: "get",
        data: {
            queueId: getLocalQueueId
        },
        success: function (data) {
            parent?parent.layer.close(load):layer.close(load);
            var res = JSON.parse(data);
            // res = {"status":0,"desc":"操作成功","data":[{"signId":"82f59ed188fd4e6bb7ee9a9b981458b3","patientKey":"1230601","eHealthKey":null,"medicalCardKey":null,"patientName":"测试A1","registerId":"1","registerType":1,"registerObjKey":"21966b686ee84dbfb48f0f2055a1b196_1","registerObjName":"心脏彩超1队列","timeType":0,"registerTime":"2023-01-05 09:07:55","treatDate":"2023-01-05 00:00:00","queuingLevel":null,"queuingLevelName":null,"editor":"automatic","editTime":"2023-01-05 09:09:30","isDeleted":0,"hospitalId":"4e66fabafd944e458dc259ce890c31f3","sex":1,"signDate":"2023-01-05 00:00:00","signType":1,"endTreatDate":"2023-01-05 00:00:00","signTime":"2023-01-05 09:09:30","isTriage":0,"triageTime":null,"signDeviceType":1,"signDeviceId":null,"systemId":"092dcdd7739e4949afe8b4f614a089e6dev","remarks":null,"patientCardKey":"1230601","hospitalizationNo":null,"examinationInfo":null,"docName":"","category":"0","registerNo":"56724814e8c24d9ca6591e23d06626b5","isBook":0,"bookStartTime":null,"bookEndTime":null,"oldRegisterObjKey":null},{"signId":"e6fb58858bcb470d9cfb072690aa2b7f","patientKey":"1230602","eHealthKey":null,"medicalCardKey":null,"patientName":"测试A2","registerId":"2","registerType":1,"registerObjKey":"21966b686ee84dbfb48f0f2055a1b196_1","registerObjName":"心脏彩超1队列","timeType":0,"registerTime":"2023-01-05 09:07:58","treatDate":"2023-01-05 00:00:00","queuingLevel":null,"queuingLevelName":null,"editor":"automatic","editTime":"2023-01-05 09:09:30","isDeleted":0,"hospitalId":"4e66fabafd944e458dc259ce890c31f3","sex":1,"signDate":"2023-01-05 00:00:00","signType":1,"endTreatDate":"2023-01-05 00:00:00","signTime":"2023-01-05 09:09:30","isTriage":0,"triageTime":null,"signDeviceType":1,"signDeviceId":null,"systemId":"092dcdd7739e4949afe8b4f614a089e6dev","remarks":null,"patientCardKey":"1230602","hospitalizationNo":null,"examinationInfo":null,"docName":"","category":"0","registerNo":"a45bd208057d4b1c84bdb85c92b3ad95","isBook":0,"bookStartTime":null,"bookEndTime":null,"oldRegisterObjKey":null}]};
            if (res.status == 0) {
                var frag =  dealWdbList(res.data);
                $('#wbdList').html(frag);
                var _queryKey = localStorage.getItem("_P_KEY_");
                $('#pid_'+_queryKey).addClass('active');
            }else {
                $('#wbdList').html('');
            }
        },
        error: function (data) {
            console.warn(data.message);
        }
    });
}
function dealWdbList(arr) {
    arr = arr ||[];
    var frag = '';
    for (var i = 0;i<arr.length;i++){
        frag +='<ul class="clearfix" id="pid_'+(arr[i]['id'])+'" data-patientKey="'+arr[i]['patientKey']+'" data-patientCardKey="'+arr[i]['patientCardKey']+'">';
        frag +='<li></li>';
        frag +='<li>'+(i+1)+'</li>';
        frag +='<li>'+(arr[i]['registerId']||'')+'</li>'; //没有就诊号
        frag +='<li>'+(arr[i]['patientName']||'')+'</li>';
        frag +='<li>'+(arr[i]['doctorName']||'')+'</li>';
        frag +='<li>'+(arr[i]['timeType']||'')+'</li>';
        frag +='<li>'+(arr[i]['registerTime']||'')+'</li>';
        frag +='<li><button type="button" class="layui-btn layui-btn-link layui-btn-normal"  onclick=xcbdAct("'+arr[i]['patientKey']+'","wbd")>报到</button></li>';
        frag +='</ul>';
    }
    return frag;
}
/***
 * 处理患者列表
 * @param arr
 * @param type 0 等候患者  1 复诊患者  2 已就诊患者 3 未分诊患者
 * **/
function dealPatientList(arr,type) {
    arr = arr ||[];
    var frag = '';
    for (var i = 0;i<arr.length;i++){
        if(arr[i]){
            var _doctorname = getNotBlankData(arr[i].doctorName);//普通队列医生名字
            var _docName = getNotBlankData(arr[i].docName);//专家队列医生名字
            var doctorname = "";
            var delDoctorStyle = "display: none";
            if (_docName !== "") {
                doctorname = _docName;
                delDoctorStyle = "display: none";
            } else {
                if (_doctorname == "" || _doctorname == "全部") {
                    doctorname = "";
                    delDoctorStyle = "display: none";
                } else {
                    doctorname = _doctorname;
                    delDoctorStyle = "display: block";
                }
            }
            frag +='<ul id="pid_'+(arr[i]['id']||arr[i]['signId'])+'" class="clearfix status-'+localStorage["colorStatus"]+'-'+arr[i]['pretestStage']+'" ';
                                                        // 分诊状态:1 初诊，2 复诊                           //候诊状态 0 正常 1 优先 2 挂起 3 延时
            frag +=' data-id="'+(arr[i]['id']||'')+'" data-treatStatus="'+(arr[i]['treatStatus']||'')+'" data-waitingStatus="'+(arr[i]['waitingStatus']||'')+'"';
            // 就诊状态 1 候诊 2 诊室等候 3 就诊中  4 已就诊                     已就诊状态 1 已就诊 2 过号 3 绿色通道                              是否过号召回 1：是 0：否
            frag +=' data-treatmentStage="'+(arr[i]['treatmentStage']||'')+'" data-treatmentEndStatus="'+(arr[i]['treatmentEndStatus']||'')+'" data-isNumRecall="'+(arr[i]['isNumRecall']||'')+'"';
            // 是否绿色通道 1：是 0：否                                         预检状态 1 红区 2 黄区 3 绿区
            frag +=' data-isGreenChannel="'+(arr[i]['isGreenChannel']||'')+'" data-pretestStage="'+(arr[i]['pretestStage']||'')+'" data-signId="'+(arr[i]['creater']||'')+'"';
            frag +=' data-registerId="'+(arr[i]['registerId']||'')+'" data-patientName="'+(arr[i]['patientName']||'')+'"  data-queueId="'+(arr[i]['queueId']||'')+'"';
            frag +=' data-patientKey="'+(arr[i]['patientKey']||'')+'" data-registerobjkey="'+(arr[i]['registerObjKey']||'')+'" data-signids="'+(arr[i]['signId']||'')+'"';
            frag +=' data-signType="'+(arr[i]['signType']||'')+'" ';
            frag +=' >';
            frag +='<li><input name="sel_radio" type="radio"></li>';
            // 序号
            frag +='<li>'+(i+1)+'<i class="mui-icon icon-waitingStatus-'+arr[i]['waitingStatus']+'">1优先/2延时/3挂起</i><i class="mui-icon icon-isNumRecall-'+arr[i]['isNumRecall']+'">过号召回</i></li>';
            // 就诊号
            frag +='<li>'+(arr[i]['registerId']||'')+'</li>';
            // 患者姓名
            frag +='<li>'+(arr[i]['patientName']||'')+'</li>';
            // 医生姓名
            if(type==0){
                frag +='<li class="unbind">'+(doctorname?'<span  onclick="unbindDoc(this)">'+doctorname+'<i class="layui-icon layui-icon-close"></i></span>':'')+'</li>';
            }else {
                frag +='<li>'+(doctorname||'')+'</li>';
            }

            //  就诊状态
            if(type==3) {
                // 未分诊
                frag += '<li>未分诊</li>';
            }else if(type==2){
                // 已就诊
                if(arr[i].treatmentEndStatus<0){
                    frag +='<li>'+(getTreatmentStatus(arr[i].treatmentStage)||'')+'</li>';
                }else {
                    frag +='<li>'+(getEndStatus(arr[i].treatmentEndStatus)||'')+'</li>';
                }
            }else {
                // 等候 / 复诊
                frag +='<li>'+(getTreatmentStatus(arr[i].treatmentStage)||'')+'</li>';
            }
            // 午别
            frag +='<li>'+(getTimeName(arr[i].timeType)||'')+'</li>';
            // 挂号时间
            frag +='<li>'+(arr[i]['signTime']||'')+'</li>';
            // 备注
            frag +='<li>'+(waitingStatus(arr[i]['waitingStatus'])||'/')+'</li>';
            frag +='</ul>';
        }
    }
    return frag;
}
/**
 *   防止重复点击
 *  重复点击会一直更新最后点击时间，最后点击时间和当前时间做对比，大于500则继续
 * **/
function clickThrottle() {
    var nowClick = new Date();
    if (!lastClick) {
        lastClick = nowClick;
        return true;
    } else {
        if (Math.round((nowClick.getTime() - lastClick.getTime())) > 500) {
            lastClick = nowClick;
            return true;
        }
        else {
            lastClick = nowClick;
            return false;
        }
    }
}

// 是否开启医护对讲
function switchCall() {
    $.ajax({
        url:ajaxCallUrl,
        type:"get",
        data:{
            hospitalId:getHospitalId()
        },
        success:function (res) {
            if(res.status == "0"){
                if(res.data&&res.data.videoPassSwitch!=0){
                    $('#intercom').addClass('yui-show');
                }
            }
        }
    });
}

/**
 * 查询并修改勿扰模式
 */
function isSwitchCalling() {
    var _triageId = getLocalDeviceCookie("C_OR_T_ID") == null ? getDeviceId() : getLocalDeviceCookie("C_OR_T_ID");
    $.ajax({
        url:ajaxCallStatusUrl,
        type:"get",
        data:{
            deviceId:_triageId,
            disturbStatus:''
        },
        success:function (res) {
            if(res.status == "0"){
                localStorage.setItem('callStatus',res.data.disturbStatus);
                isDisableCall(res.data.disturbStatus);
            }else {

            }
        }
    });
}
/**
 *  获取优先类型
 * **/
function getFirstDic() {
    //?dicType=1
    $.ajax({
        url: ajaxFirstDicUrl,
        type: 'get',
        data: {
            dicType: 2,
        },
        success: function (d) {
            var res = JSON.parse(d);
            if (res.status == '0') {
                localStorage.setItem('ym_dic',JSON.stringify(res.data));
            }
        }
    });
}

/**
 *  高亮可以操作的按钮
 *
 * */
function setActiveButton(data) {
    var idx = $('#nurse_tabs li.active').index();
    var menu = {
        sycz:{'data':data,'type':'sycz','title':'上移',disabled:0,show:1},// 上移
        zzcz:{'data':data,'type':'zzcz','title':'转诊',disabled:0,show:1},
        xycz:{'data':data,'type':'xycz','title':'下移',disabled:0,show:1},
        fzcz:{'data':data,'type':'fzcz','title':'分诊',disabled:0,show:1},
        yxcz:{'data':data,'type':'yxcz','title':'优先',disabled:0,show:1},
        qxyx:{'data':data,'type':'qxyx','title':'取消优先',disabled:0,show:0},
        fzhz:{'data':data,'type':'fzhz','title':'复诊',disabled:0,show:1},
        lstd:{'data':data,'type':'lstd','title':'绿色通道',disabled:0,show:1},
        zhcz:{'data':data,'type':'zhcz','title':'过号召回',disabled:0,show:1},
        gqcz:{'data':data,'type':'gqcz','title':'挂起',disabled:0,show:1},
        qxgq:{'data':data,'type':'qxgq','title':'取消挂起',disabled:0,show:0},
        yscz:{'data':data,'type':'yscz','title':'延时',disabled:0,show:1},
        qxys:{'data':data,'type':'qxys','title':'取消延时',disabled:0,show:0}
    };
    if(idx==0||idx==1){
        menu['sycz']['disabled'] = 1;
        menu['zzcz']['disabled'] = 1;
        menu['xycz']['disabled'] = 1;
        menu['yxcz']['disabled'] = 1;
        menu['qxyx']['disabled'] = 1;
        menu['lstd']['disabled'] = 1;
        menu['gqcz']['disabled'] = 1;
        menu['qxgq']['disabled'] = 1;
        menu['yscz']['disabled'] = 1;
        menu['qxys']['disabled'] = 1;

        $('.btn-tools button').removeClass('layui-btn-disabled').prop('disabled',false);
        $('#btn_fzcz,#btn_zhcz').addClass('layui-btn-disabled').prop('disabled',true);
        // 就诊状态 为 2 诊室等候
        if(data.treatmentstage==2){
            // 不能 上下移 优先 分诊 挂起 延时  广播
            $('#btn_moveUp,#btn_moveDown,#btn_toFirst,#btn_fzcz,#btn_gqcz,#btn_yscz,#btn_yscz').addClass('layui-btn-disabled').prop('disabled',true);
            menu['sycz']['disabled'] = 0;
            menu['xycz']['disabled'] = 0;
            menu['yxcz']['disabled'] = 0;
            menu['gqcz']['disabled'] = 0;
            menu['yscz']['disabled'] = 0;
        }
        //1 优先 2 挂起 3 延时
        if(data.waitingstatus==1){
            $('#btn_toFirst,#btn_gqcz,#btn_zzcz,#btn_yscz,#btn_yscz').addClass('layui-btn-disabled').prop('disabled',true);
            menu['yxcz']['show'] =  0; //隐藏优先
            menu['qxyx']['show'] =  1;  //展示取消优先
            menu['qxyx']['disabled'] = 1;  // 禁用延时
            menu['yscz']['disabled'] =  0; // 禁用延时
            menu['gqcz']['disabled'] =  0; // 禁用挂起
            menu['zzcz']['disabled'] =  0;
        }else if(data.waitingstatus==2||data.waitingstatus==3){
            $('#btn_moveUp,#btn_moveDown,#btn_zzcz,#btn_zzcz,#btn_toFirst,#btn_gqcz,#btn_yscz,#btn_yscz').addClass('layui-btn-disabled').prop('disabled',true);
            menu['sycz']['disabled'] =  0;
            menu['zzcz']['disabled'] =  0;
            menu['xycz']['disabled'] =  0;
            menu['yxcz']['disabled'] =  0;
            menu['yscz']['disabled'] =  0;
            if(data.waitingstatus==2){
                menu['qxgq']['show'] =  1;
                menu['gqcz']['show'] =  0;
                menu['gqcz']['disabled'] =  0;
            }else {
                menu['qxys']['show'] =  1;
                menu['gqcz']['disabled'] =  0;
                menu['yscz']['show'] =  0;
                menu['yscz']['disabled'] =  0;
            }
        }
    }
    else if(idx==2){
        $('.btn-tools button').addClass('layui-btn-disabled').prop('disabled',true);
        //已就诊状态 1 已就诊 2 过号 3 绿色通道
        if(data.treatmentendstatus==2){
            $('#btn_zhcz').removeClass('layui-btn-disabled').prop('disabled',false);
            menu['zhcz']['disabled'] =  1;
        }
        // 还允许复诊
        menu['fzhz']['disabled'] =  1;
    }
    else {
        menu['fzhz']['disabled'] = 0;
        menu['lstd']['disabled'] = 1;
        menu['fzcz']['disabled'] = 1;
        $('#btn_lstd,#btn_fzcz').removeClass('layui-btn-disabled').prop('disabled',false);
    }
    var arr = [];
    for (var k in menu){
        arr.push(menu[k])
    }
    return arr;
}
